﻿using System;
using System.Collections.Generic;
using System.Text;

namespace CodeSnippetsEditor
{
    class DropDownListItem
    {
        private string itemValue = string.Empty;
        private string itemText = string.Empty;

        #region Kontruktory

        /// <summary>
        /// Initializes a new instance of the <see cref="DropDownListItem"/> class.
        /// </summary>
        public DropDownListItem()
        { }

        /// <summary>
        /// Initializes a new instance of the <see cref="DropDownListItem"/> class.
        /// </summary>
        /// <param name="Text">The text.</param>
        public DropDownListItem(string Text)
        {
            itemText = itemValue = Text;
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="DropDownListItem"/> class.
        /// </summary>
        /// <param name="Text">The text.</param>
        /// <param name="Value">The value.</param>
        public DropDownListItem(string Text, string Value)
        {
            itemText = Text;
            itemValue = Value;
        }

        #endregion

        #region Vlastnosti

        /// <summary>
        /// Gets or sets the item value.
        /// </summary>
        /// <value>The item value.</value>
        public string Value
        {
            get
            {
                return itemValue;
            }
            set
            {
                itemValue = value;
            }
        }

        /// <summary>
        /// Gets or sets the item text.
        /// </summary>
        /// <value>The item text.</value>
        public string Text
        {
            get
            {
                return itemText;
            }
            set
            {
                itemText = value;
            }
        }

        #endregion

        /// <summary>
        /// Returns a <see cref="T:System.String"/> that represents the current <see cref="T:System.Object"/>.
        /// </summary>
        /// <returns>
        /// A <see cref="T:System.String"/> that represents the current <see cref="T:System.Object"/>.
        /// </returns>
        public override string ToString()
        {
            return itemText;
        }

    }
}
